import React from 'react'
import classNames from 'classnames'
import { Icon } from 'antd-mobile'
import styles from './index.module.scss'

class Alert extends React.Component{
    render(){
        const { message } = this.props
        return (
            <div className={classNames(styles['ant-alert'], styles[`ant-alert-error`])}>
                <Icon type='cross-circle-o' size="xxs" style={{ color: '#f5222d' }}/>
                <span className={styles['message']}>{message}</span>
            </div>
        )
    }
}

export default Alert



//const iconStyle = {
//    type: {
//        success: 'check-circle',
//        error: 'cross-circle-o'
//    },
//    color: {
//        success: '#52c41a',
//        error: '#f5222d'
//    }
//}